<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>表格标签</title>

  <style>
      table {
          /*border-collapse决定表格的边框是分开的还是合并的*/
          border-collapse: collapse;
          border-spacing: 0;
          width: 500px;
      }
      td,th {
          padding: 5px;
          border: 1px solid #000;
          text-align: center;
      }
  </style>
</head>
<body>
<h1>表格标签</h1>

<table>
  <!--表格标题-->
  <caption>学生信息</caption>
  <!--表格头部-->
  <thead>
  <tr>
    <th>姓名</th>
    <th>性别</th>
    <th>年龄</th>
    <th>民族</th>
    <th>政治面貌</th>
  </tr>
  </thead>
  <!--表格主体-->
  <tbody>
  <tr>
    <td>张三</td>
    <td>男</td>
    <td>18</td>
    <td>汉族</td>
    <td>共青团员</td>
  </tr>
  <tr>
    <td>李四</td>
    <td>女</td>
    <td>19</td>
    <td>汉族</td>
    <td rowspan="2">群众</td>
  </tr>
  <tr>
    <td>王五</td>
    <td>男</td>
    <td>20</td>
    <td>回族</td>
  </tr>
  <tr>
    <td>赵六</td>
    <td>女</td>
    <td>22</td>
    <td>汉族</td>
    <td>党员</td>
  </tr>
  </tbody>
  <!--表格脚注-->
  <tfoot>
  <tr>
    <td colspan="5">共计：4人</td>
  </tr>
  </tfoot>
</table>
</body>
</html>
